def script(self): props = com.to_jsobject(self._property_dict) props = ''.join(props) if props != '': script = """{klass}.load("{source}", {props})""" script = script.format(klass=self._klass, source=self.sourceUri, props=''.join(props)) else: script = """{klass}.load("{source}")""" script = script.format(klass=self._klass, source=self.sourceUri) return script
def script(self): props = com.to_jsobject(self._property_dict) props = ''.join(props) if props != '': script = """var {varname} = new {klass}("{divid}", {props});""" script = script.format(varname=self._varname, klass=self._klass, divid=self.div.divid, props=''.join(props)) else: script = """var {varname} = new {klass}("{divid}");""" script = script.format(varname=self._varname, klass=self._klass, divid=self.div.divid) return ([script] + self._entities.script + self._dataSources.script + [self._camera_script] + self._scene.script + self.scripts._items)
def script(self): props = self._property_dict results = com.to_jsobject(props) return ''.join(results)