-
-
Save pavelvasev/02f85558b19a00239086 to your computer and use it in GitHub Desktop.
scenejs setIndices setPrimitive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SceneJS.Geometry.prototype.setIndices = function (data) { | |
if (data.indices && this._core.indexBuf) { | |
this._boundary = null; | |
var core = this._core; | |
core.indexBuf.bind(); | |
core.indexBuf.setData(new Uint16Array(data.indices), data.indicesOffset || 0 ); | |
core.arrays.indices.set(data.indices, data.indicesOffset || 0 ); | |
this._engine.display.imageDirty = true; | |
} | |
}; | |
SceneJS.Geometry.prototype.setPrimitive = function (data) { | |
this._core.primitive = this._getPrimitiveType(data.primitive); | |
this._engine.display.imageDirty = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice - I'll include that in the next SceneJS iteration - thanks!