mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
913c9013eb
* Modify part of asset classes * Update import * Update * mesh-loader * Update the import statement of JsonAsset as default import * Rename files * Remove old asset and asset-mng * Copyrights * Fix some bugs * Fix imports of vmath classes; Fix errors of decorator property's ts comment notation;Adjust the order of member declarations for better IDE intelligense * Transplant loader of animation clip; Unify export statement style according rules * Skeleton asset and SkeletonInstance class * Rename * Fix material annotation * fix import path * fix annotation error * Rename update to flush, fix index.js files. * support original gltf animation;use creator's texture2d instead * Fix build issues * Avoid system absent issue caused by ecs import * add renderer to ccgame, add camera component * apply stash * fix predefine.js * add renderable and rendersystem * fix format * Fix core/utils module * Rename file and fix issues * add renderer to ccgame, add camera component * apply stash * fix predefine.js * add renderable and rendersystem * fix format * fix debug * fix run errors * Fix MutableForwardIterator not found issue * Fix editor runtime issues * Update 3d node API usage (need merge API in future) * Temporarily comment out rendering code (need revert) * add renderer to ccgame, add camera component * apply stash * fix predefine.js * add renderable and rendersystem * fix format * fix debug * fix run errors * renderer can clear now * misc fixes in vmath better vector random sampling custom w in vec3.transformMat4 * prepare geometry data in editor mode * per-primitive raycast for editor * fix dependencies * fix cctouch error * fix error, can not rendering * model can be rendered * fix for node api changing * class rename * clean up code * add name to ccclass decorators; temporarily comment out vb/ib buffer creation in gltf-loader;temporarily modification of base-node.js * Open commented vb/ib creation * make gltf-asset itself a variant of json * fix import bugs * update * import fix * node transform api * mesh renderer and skinning mesh renderer * bug fix * bug fix
69 lines
2.1 KiB
JavaScript
69 lines
2.1 KiB
JavaScript
/****************************************************************************
|
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
|
|
|
http://www.cocos.com
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated engine source code (the "Software"), a limited,
|
|
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
|
to use Cocos Creator solely to develop games on your target platforms. You shall
|
|
not use Cocos Creator software for developing other software or tools that's
|
|
used for developing games. You are not granted to publish, distribute,
|
|
sublicense, and/or sell copies of Cocos Creator.
|
|
|
|
The software or tools in this License Agreement are licensed, not sold.
|
|
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
THE SOFTWARE.
|
|
****************************************************************************/
|
|
//@ts-check
|
|
import { _decorator } from "../core/data/index";
|
|
const {ccclass, property} = _decorator;
|
|
|
|
/**
|
|
* !#en
|
|
* Class for buffer asset.
|
|
*
|
|
* !#zh
|
|
* Buffer 资源类。<br>
|
|
*
|
|
* @class BufferAsset
|
|
* @extends Asset
|
|
*/
|
|
@ccclass('cc.BufferAsset')
|
|
export default class BufferAsset extends cc.Asset {
|
|
/**
|
|
* @type {Uint8Array}
|
|
*/
|
|
@property
|
|
_data = null;
|
|
|
|
/**
|
|
* @type {Uint8Array}
|
|
*/
|
|
get _nativeAsset () {
|
|
return this._data;
|
|
}
|
|
|
|
/**
|
|
* @type {Uint8Array}
|
|
*/
|
|
set _nativeAsset (value) {
|
|
this._data = value;
|
|
}
|
|
|
|
/**
|
|
* @type {Uint8Array}
|
|
*/
|
|
get data() {
|
|
return this._data;
|
|
}
|
|
}
|
|
|
|
cc.BufferAsset = BufferAsset; |