Skip to content

Instantly share code, notes, and snippets.

@coderextreme
Created February 15, 2016 22:13
Show Gist options
  • Save coderextreme/cb319023655e71749194 to your computer and use it in GitHub Desktop.
Save coderextreme/cb319023655e71749194 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
</style>
<transform translation="function () {
return [
Math.random()*10-5,
Math.random()*10-5,
Math.random()*10-5];
}">
<shape>
<sphere radius="0.1">
<appearance>
<material diffusecolor="1 0 0">
</material>
</appearance>
</sphere>
</shape>
</transform>
</template>
<script>
Polymer({
location: function () {
return [
Math.random()*10-5,
Math.random()*10-5,
Math.random()*10-5];
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment