Skip to content

@simversus/yjvis


@simversus/yjvis / utils / projectUtil

Variable: projectUtil

const projectUtil: object

Defined in: utils/projectUtil.ts:1

Type Declaration

avalidGpuData()

avalidGpuData: (data) => boolean

校验向gpu传递的数据是否合法

Parameters

data

any

Returns

boolean

beautifyShader()

beautifyShader: (str) => string

Parameters

str

string = ''

Returns

string

logExecutionTime()

logExecutionTime: (message?) => (target, propertyKey, descriptor) => PropertyDescriptor

方法装饰器,打印执行时间

Parameters

message?

string

Returns

(target, propertyKey, descriptor): PropertyDescriptor

Parameters
target

any

propertyKey

string

descriptor

PropertyDescriptor

Returns

PropertyDescriptor

serializable

serializable: object

toJSON()

toJSON: (instance) => any

序列化一个包含可序列化属性的对象

Parameters

instance

any

Returns

any