Secrets of the JavaScript Ninja - Chapter 12. DOM modificationHyuncheol Jeon"Secrets of the JavaScript Ninja"에서 12장 : DOM 조작에 대해 설명한다.
* 정리 된 위키 : http://goo.gl/VfjiM
20150212 c++11 features used in crowJaeseung Hahttp://github.com/ipkn/crow
Crow 프로젝트에서 사용한 C++11 기법들을 실제 구현에 대한 설명을 포함하여 자세히 설명한 발표자료입니다.
C++11 features used in Crow
video:
http://youtu.be/MixS9c3mE6U
https://vimeo.com/119627253
Bs webgl소모임004Seonki PaikThe document discusses implementing a basic 2D game engine in WebGL. It outlines the steps needed to create the engine including initializing WebGL, parsing shaders, generating buffers, creating mesh and material structures, and rendering. Code snippets show implementations for functions like init(), makeBuffer(), shaderParser(), Material(), Mesh(), and a basic render() function that draws object hierarchies with one draw call per object. The overall goal is to build out the core components and architecture to enable building 2D games and experiences in WebGL.
Secrets of the JavaScript Ninja - Chapter 12. DOM modificationHyuncheol Jeon"Secrets of the JavaScript Ninja"에서 12장 : DOM 조작에 대해 설명한다.
* 정리 된 위키 : http://goo.gl/VfjiM
20150212 c++11 features used in crowJaeseung Hahttp://github.com/ipkn/crow
Crow 프로젝트에서 사용한 C++11 기법들을 실제 구현에 대한 설명을 포함하여 자세히 설명한 발표자료입니다.
C++11 features used in Crow
video:
http://youtu.be/MixS9c3mE6U
https://vimeo.com/119627253
Bs webgl소모임004Seonki PaikThe document discusses implementing a basic 2D game engine in WebGL. It outlines the steps needed to create the engine including initializing WebGL, parsing shaders, generating buffers, creating mesh and material structures, and rendering. Code snippets show implementations for functions like init(), makeBuffer(), shaderParser(), Material(), Mesh(), and a basic render() function that draws object hierarchies with one draw call per object. The overall goal is to build out the core components and architecture to enable building 2D games and experiences in WebGL.
ELD12: Badge DesignhalavaisThis document provides an overview of badges and how they can work. It discusses how the author got interested in badges, how badges can recognize skills and accomplishments, and what has been learned about implementing badges. The document also provides resources for getting started with badges and examples of how other organizations are using them.
The Power of WebGL - Hackeando sua GPU com JavaScriptRaphael AmorimVamos aprender a hackear placas de vídeo com Javascript usando WebGL (Web Graphics Library) e a usar a mesma tecnologia para criar realidade virtual usando MozVR. WebGL é uma API em JavaScript, disponível a partir do novo elemento canvas da HTML5, que oferece suporte para renderização de gráficos 2D e gráficos 3D.
WebGL: GPU acceleration for the open webpjcozziAn introduction to WebGL for OpenGL developers. Topics include current browser support - as of September 2011 - and JavaScript.
22. 1. 모든 정보를 1개의 버퍼에 입력하는 방법
2. 유동 버퍼와 고정 버퍼를 나눠서 입력하는 방법
3. 유동버퍼를 세분화 하는 방법
HOW TO…
Local Vertex
position
Position,
Color,
Rotation,
..
.
Local Vertex position
Position,
Color,
Rotation,
..
.
Local Vertex position
Position
Rotation
Etc….
23. Think - 모든 정보를 1개의 버퍼에 입력하는 방법
1개의 정점정보 관리만 잘하면 된다
정점 1개의 변화에 대한 성능적 손실이 크다.
maxVertexAttri 제한 (정점별 정보입력수)
장
단
gl.getParameter(gl.MAX_VERTEX_ATTRIBS)
1개의 정점 구성
Local Vertex position
Position,
Color,
Rotation,
..
.
24. Think - 유동 버퍼와 고정 버퍼를 나눠서 입력하는 방법
정점 1개의 변화에 대한 손실이 적다.
maxVertexAttri 제한을 피할 수 있다.
관리 복잡성이 증가.
장
단
1개의 정점 구성
Local Vertex position
Position,
Color,
Rotation,
...
고정버퍼 유동버
퍼
CPU 연산비용 소비
25. Think - 유동버퍼를 세분화 하는 방법
정점 1개의 변화에 대한 손실이 적다.
maxVertexAttri 제한을 피할 수 있다.
관리 복잡성이 더더더더더 증가.
장
단
1개의 정점 구성
Local Vertex position
Position
Rotation
Etc….
CPU 연산비용 개별적 소비
26. HOW TO... 생성된 메쉬 정보를 병합한다!
고정 Buffer
var rectData = [
-.5, -.5, 0.0,
-.5, .5, 0.0,
.5, -.5, 0.0,
.5, .5, 0.0
]
var rectData = [
-.5, -.5, 0.0,
-.5, .5, 0.0,
.5, -.5, 0.0,
.5, .5, 0.0
]
var rectData = [
-.5, -.5, 0.0,
-.5, .5, 0.0,
.5, -.5, 0.0,
.5, .5, 0.0
]+ +
var mergedData = [
…………
]
27. HOW TO... 생성된 메쉬 정보를 병합한다!
function mergeMesh($list) {
var item, i, len = $list.length, tempVBO = [], tempIBO = []
for (i = 0; i < len; i++) {
item = $list[i]
tempVBO.push(rectData[0], rectData[1], rectData[2])
tempVBO.push(rectData[3], rectData[4], rectData[5])
tempVBO.push(rectData[6], rectData[7], rectData[8])
tempVBO.push(rectData[9], rectData[10], rectData[11])
tempIBO.push(
i * 4 + 0, i * 4 + 1, i * 4 + 2, // 사각형의 첫번째 삼각형
I * 4 + 1, I * 4 + 2, I * 4 + 3 // 사각형의 두번째 삼각형
)
}
}
Vertex 1
Vertex 2
Vertex 3
Vertex 4
28. HOW TO... 생성된 메쉬 정보를 병합한다!
function mergeMesh($list) {varitem, i, len = $list.length, tempVBO = [], tempIBO = []
for (i = 0; i < len; i++){
item = $list[i]
tempVBO.push(rectData[0], rectData[1], rectData[2])
tempVBO.push(rectData[3], rectData[4], rectData[5])
tempVBO.push(rectData[6], rectData[7], rectData[8])
tempVBO.push(rectData[9], rectData[10], rectData[11])
tempIBO.push(
i * 4 + 0, i * 4 + 1, i * 4 + 2, // 사각형의 첫번째 삼각형
I * 4 + 1, I * 4 + 2, I * 4 + 3 // 사각형의 두번째 삼각형
)
}
var vboBuffer = gl.createBuffer()
gl.bindBuffer(gl.ARRAY_BUFFER, vboBuffer)
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(tempVBO), gl.STATIC_DRAW)
vboBuffer.itemSize = 3, vboBuffer.numItem = 4 * len
var indexBuffer = gl.createBuffer()
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer)
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(tempIBO), gl.STATIC_DRAW)
indexBuffer.itemSize = 1, indexBuffer.numItem = 6 * len
}
29. HOW TO... 생성된 메쉬 정보를 병합한다!
유동 Property Buffer
하나의 지오메트리를 구성하는 버텍스는
모두 같은 Property를 가진다.
var mesh = {
position : [ 0, 0, 0 ],
rotation : [ 0, 0, 0 ].
scale : [ 1, 1, 1 ]
}
Geometry
mesh.position
mesh.position
mesh.position
30. HOW TO... 생성된 메쉬 정보를 병합한다!
유동 Property Buffer
function mergeMesh($list) {
.. 생략
tempPositionBO.push(item.position[0], item.position[1], 0)
tempPositionBO.push(item.position[0], item.position[1], 0)
tempPositionBO.push(item.position[0], item.position[1], 0)
tempPositionBO.push(item.position[0], item.position[1], 0)
}
var positionBuffer = gl.createBuffer()
gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer)
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(tempPositionBO), gl.DYNAMIC_DRAW)
positionBuffer.itemSize = 3
positionBuffer.numItem = 4 * len
31. HOW TO... 생성된 메쉬 정보를 병합한다!
메쉬 병합 결과
var result = {}
result.vbo = vboBuffer
result.ibo = indexBuffer
result.rotationBo = rotationBuffer
result.positionBo = positionBuffer
result.scaleBo = scaleBuffer
result.colorBo = colorBuffer
고정 버퍼
유동버퍼
반 고정 버퍼